#include "../../tools.h"

class Solution {
private:
    int imin = 1 << 31;
    int imax = INT32_MAX;
public:
    int reverse(int x) {
        bool flag = false;
        if(x < 0) {
            flag = true;
            x = -x;
        }

        char num[33] = {0};
        int n = 0;
        while(x > 0){
            num[n++] = '0' + x % 10;
            x /= 10;
        }

        for(int i = 0; i < n; ++i){
            if(num[i] >)
        }

        int res = 0;
        for(int i = 0; i < n; ++i){
            cout << imax - res * 10 << endl;
            if(!flag && imax - res * 10 < (num[i] - '0')) return 0;
            if(flag && imin + res * 10 + (num[i] - '0') > 0) return 0;
            res = res * 10 + (num[i] - '0');
        }
        if(flag) res = -res;
        return res;
    }
};


int main(int argc, char const *argv[])
{
    Solution s;

    int x = 1534236469;

    cout << s.reverse(x) << endl;

    return 0;
}
